<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">	
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
	<meta name = "format-detection" content = "telephone=no">	
	<meta content="yes" name="apple-mobile-web-app-capable">
	<meta content="yes" name="apple-touch-fullscreen">
    <title>养悦源</title>
    <link rel="stylesheet" href="<?php echo $base_url;?>static/dist/style/css/base.css">
    <link rel="stylesheet" href="<?php echo $base_url;?>static/dist/style/less/lib/swiper.min.css">
    <script>
        var deviceWidth = document.documentElement.clientWidth;
        if (deviceWidth > 640) deviceWidth = 640;
        document.documentElement.style.fontSize = deviceWidth / 7.5 + 'px';

		function setDpr(){
			var doc = window.document;
			// var docEl = doc.documentElement;
			var metaEl = doc.querySelector('meta[name="viewport"]');
			var match = metaEl.getAttribute('content').match(/initial\-scale=([\d\.]+)/)
			var dpr = 0;
			// if (match) {
			// 	scale = parseFloat(match[1]);
			// 	dpr = parseInt(1 / scale);
			// }
			if(!dpr){
				var isAndroid = window.navigator.appVersion.match(/android/gi);
				var isIPhone = window.navigator.appVersion.match(/iphone/gi);
				var devicePixelRatio = window.devicePixelRatio;
				if (isIPhone) {
				// iOS下，对于2和3的屏，用2倍的方案，其余的用1倍方案
					if (devicePixelRatio >= 3 && (!dpr || dpr >= 3)) {                
						dpr = 3;
					} else if (devicePixelRatio >= 2 && (!dpr || dpr >= 2)){
						dpr = 2;
					} else {
						dpr = 1;
					}
				} else {
					// 其他设备下，仍旧使用1倍的方案
					dpr = 1;
				}
			}
			window.document.documentElement.setAttribute('data-dpr',dpr);
		}
		setDpr();
    </script>
</head>
